import { LOADDATA } from './actionTypes'

// import { get } from '@/utils/http.js'

const loadDataSync = list => {
  return {
    type: LOADDATA,
    list
  }
}

const loadDataSyncSaga = () => {
  return {
    type: 'loadDataSaga'
  }
}

// 在容器组件中run
// const loadDataAsync = () => {
//   return async (dispatch) => {
//     let result = await get({
//       url: "/api/list"
//     })
//     dispatch(loadDataSync(result.data.data))
//   }
// }

export default {
  loadDataSync,
  loadDataSyncSaga
  // loadDataAsync
} 
